import request from '@/utils/request2'

// 承包商列表
export function contractorList(query) {
  return request({
    url: '/contractor/list',
    method: 'get',
    baseURL: process.env.VUE_APP_BASE_API2,
    params: query
  })
}

// 承包商明细列表查看
export function contractorDetailList(data) {
  return request({
    url: '/contractor/listWorker',
    method: 'post',
    baseURL: process.env.VUE_APP_BASE_API2,
    data
  })
}

// 新增保存
export function addContractor(data) {
  return request({
    url: '/contractor/add',
    method: 'post',
    baseURL: process.env.VUE_APP_BASE_API2,
    data
  })
}

// 编辑保存
export function editContractor(data) {
  return request({
    url: '/contractor/edit',
    method: 'post',
    baseURL: process.env.VUE_APP_BASE_API2,
    data
  })
}

// 删除
export function deleteContractor(data) {
  return request({
    url: '/contractor/delete',
    method: 'post',
    baseURL: process.env.VUE_APP_BASE_API2,
    data
  })
}
